package com.htd.erp.validation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;

/**
 * @author Zhang Guilin
 *
 */
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = BlankablePatternConstraintValidator.class)
public @interface BlankablePattern {
	
	String regexp();
	
	String message() default "{costa.validation.constraints.BlankablePattern.message}";
	
	@SuppressWarnings("rawtypes")
	Class[] groups() default {};
	
	@SuppressWarnings("rawtypes")
	Class[] payload() default {};
}
